package com.tianji.learning.controller;


import com.tianji.learning.domain.vo.SignResultVO;
import com.tianji.learning.service.SignRecordConService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * x学习签到记录表 前端控制器
 * </p>
 *
 * @author wangyuqing
 * @since 2024-08-29
 */
@Api(tags = "签到记录")
@RestController
@RequestMapping("/sign-records")
@RequiredArgsConstructor
public class SignRecordController {
    private final SignRecordConService signRecordConService;

    /**
     * 1.签到
     *
     * @return
     */
    @PostMapping("")
    @ApiOperation("签到")
    public SignResultVO addSignRecords() {
        return signRecordConService.addSignRecords();
    }

    /**
     * 2.查询签到情况
     *
     * @return
     */
    @GetMapping("")
    @ApiOperation("查询签到情况")
    public Byte[] querySignRecords() {
        return signRecordConService.querySignRecords();
    }
}
